//
//  UModel.swift
//  U17
//
//  Created by charles on 2017/10/24.
//  Copyright © 2017年 None. All rights reserved.
//

import HandyJSON


//model
struct User: HandyJSON {
    var authStatus: Int = 0
    var token: String = ""
    var roleType: Int = 0
    var user_id : Int = 0
}
struct BannerList: HandyJSON {
    var advertisementList: [Banner]?
}
struct Banner: HandyJSON {
    var image: String?
    var linkUrl: String?
}
struct MsgList: HandyJSON {
    var messageList: [MsgModel]?
}
struct MsgModel: HandyJSON {
    var createTime: String = ""
    var orderSn: String = ""
    var message: String = ""
    var type: Int = 1
    
}
struct StateModel: HandyJSON {
    var serviceStatus: Int = 0
    var serviceType: Int = 0
    var phone: String = ""
    var authStatus: Int = 0
    var avatarUrl: String = ""
    var nickname: String = ""
      var status: Bool = false
     var hasPwd: Bool = false
    
}
struct IncomeModel: HandyJSON {
    var cashMoney: Double = 0.00
    var priceTotal: Double = 0.00
    var countTotal: Int = 0
}
struct withdrowList: HandyJSON {
    var cashList: [cashModel]?
}
struct cashModel: HandyJSON {
    var checkStatus: Int = 0
    var money: Double = 0.00
    var holder: String = ""
    var bankAddress: String = ""
    var account: String = ""
    var createTime: String = ""
    
}
struct NormalBand: HandyJSON {
    var info: BandModel?
    var money: Double = 0.0
}
struct BandList: HandyJSON {
    var list: [BandModel]?
}
struct BandModel: HandyJSON {
    var id: Int = 0
    var holder: String = ""
    var bankAddress: String = ""
    var account: String = ""
    
}
struct SkillList: HandyJSON {
    var list: [SkillModel]?
}
struct SkillModel: HandyJSON {
    var id: Int = 0
    var name: String = ""
    var checked :Bool = false
}

struct UrlModel: HandyJSON {
    var url: String?
}

struct Empty: HandyJSON {
    
}
struct ServiceModel: HandyJSON {
    var status :Int = 0
}
struct UserInfo: HandyJSON {
    var serviceInfo: UserInfoModel?
}
struct RecordList: HandyJSON {
    var list: [RevenueModel]?
}
struct RevenueModel: HandyJSON {
    var address: String = ""
    var orderId: Int = 0
    var orderSn: String = ""
    var createTime: String = ""
    var price: Double = 0
    var problemDetail: String = ""
    var goodsList:[GoodsModel]?
    var type: Int = 0
}
final class GoodsModel: HandyJSON {
    var mainImage: String = ""
    var number: Int = 0
    var goodsName: String = ""
}
struct UserInfoModel: HandyJSON {
    var userId: Int = 0
    var linkPhone: String = ""
    var serviceArea: String = ""
    var carName: String = ""
    var authStatus:Int = 0
    var serviceAddress: String = ""
    var driverBack: String = ""
    var idCardSn: String = ""
    var idCardFront: String = ""
    var linkman: String = ""
    var carSn: String = ""
    var carBack: String = ""
    var skills: [String] = [""]
    var driverFront: String = ""
    var serviceRadius: Int = 0
    var carFront: String = ""
    var authType: Int = 0
    var idCardBack: String = ""
}
struct RepairList: HandyJSON {
    var list: [RepairDetail]?
}
struct RepairDetail: HandyJSON {
    var number :Int = 0
     var cost :Int = 0
    var repairName :String = ""
     var id :Int = 0
}
struct AppModel: HandyJSON {
    var app_load_url :String = ""
    var app_version :String = ""
}

final class OrderList: HandyJSON {
    var time: String = ""
    var list: [OrderModel]?
}
final class OrderInfo: HandyJSON {
    var object: OrderModel?
}
final class OrderModel: HandyJSON {
    var problemDetail: String = ""
    var orderLat: String = ""
    var orderLng: String = ""
    var orderLinkman: String = ""
    var orderPrice: Double = 0.0
    var orderLinkphone: String = ""
    var orderAddress: String = ""
    var orderSn: String = ""
    var repairTime: String = ""
    var createTime: String = ""
    var typeName: String = ""
    var goodsList: [GoodsModel]?
    var repairList: String = ""
    var problemImage: String = ""
    var serviceImage: String = ""
    var id: Int = 0
    var type: Int = 0
    
}
final class RepairModel: HandyJSON {
    var name: String = ""
}

extension Array: HandyJSON{}
struct ResponseData<T: HandyJSON>: HandyJSON {
    var msg:String?
    var code: Int = 0
    var data: T?
}

